#ifndef DATABASE_H
#define DATABASE_H

#include <mysql++.h>
#include <vector>
#include <string>
#include "types.h"
//#include "sql_struct.h"

class Database
{
    private:
        mysqlpp::Connection con;
    public:
        Database();

        bool connect(std::string db, std::string server, std::string user, std::string pass);

        bool account_create(std::string name, std::string pass);
        bool account_login(std::string name, std::string pass);
        bool character_create(int owner, std::string name);

        account get_account(int id);
        std::vector <character> get_characters(int id);
        character get_character(int id);

        int accountNameToID(std::string name);
};

#endif // DATABASE_H
